package com.itheima.service;

import com.itheima.bean.Stucord;
import com.itheima.bean.Student;
import com.itheima.mapper.OnetoOneZj;
import com.itheima.utils.Utils;
import org.apache.ibatis.session.SqlSession;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public  class Double_Service implements OnetoOneZj {

    @Override
    public ArrayList<Stucord> selectAll() throws IOException {
        SqlSession sqlSession = Utils.getSqlSession();
        OnetoOneZj mapper = sqlSession.getMapper(OnetoOneZj.class);
        ArrayList<Stucord> stucords = mapper.selectAll();
        sqlSession.close();
        return stucords;
    }
}
